﻿using System;
using System.Windows.Forms;
using ErgoBreak.Core.Resources;
using ErgoBreak.Presentation.Components;
using System.Drawing;

namespace ErgoBreak.Presentation
{
    public class PresentationBuilder
    {
        private ResourceCollection resources;

        public PresentationBuilder(ResourceCollection resources)
        {
            this.resources = resources;
        }

        public Tray Build()
        {
            return CreateTray();
        }

        private Tray CreateTray()
        {
            NotifyIcon notify = new NotifyIcon();
            Icon enabledIcon = (Icon)resources.GetResource("TrayEnabled");
            Icon disabledIcon = (Icon)resources.GetResource("TrayDisabled");
            notify.Icon = enabledIcon;
            notify.Visible = true;
            return new Tray(notify, enabledIcon, disabledIcon);
        }
    }
}
